
<form name="editForm" role="form" novalidate ng-submit="vm.save()" show-validation>

    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"
                ng-click="vm.clear()">&times;</button>
        <h4 class="modal-title" id="myMessageTpLabel" data-translate="gatewayApp.messageTp.home.createOrEditLabel">Create or edit a Message Tp</h4>
    </div>
    <div class="modal-body">
        <jhi-alert-error></jhi-alert-error>
        <div class="form-group" ng-show="vm.messageTp.id">
            <label for="id" data-translate="global.field.id">ID</label>
            <input type="text" class="form-control" id="id" name="id"
                    ng-model="vm.messageTp.id" readonly />
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="gatewayApp.messageTp.templateId" for="field_templateId">Template Id</label>
            <input type="text" class="form-control" name="templateId" id="field_templateId"
                    ng-model="vm.messageTp.templateId"
                     />
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="gatewayApp.messageTp.url" for="field_url">Url</label>
            <input type="text" class="form-control" name="url" id="field_url"
                    ng-model="vm.messageTp.url"
                     />
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="gatewayApp.messageTp.data" for="field_data">Data</label>
            <input type="text" class="form-control" name="data" id="field_data"
                    ng-model="vm.messageTp.data"
                    ng-maxlength="4000" />
            <div ng-show="editForm.data.$invalid">
                <p class="help-block"
                    ng-show="editForm.data.$error.maxlength" data-translate="entity.validation.maxlength" translate-value-max="4000">
                    This field cannot be longer than 4000 characters.
                </p>
            </div>
        </div>

        <div class="form-group">
            <label data-translate="gatewayApp.messageTp.touser" for="field_touser">Touser</label>
            <select class="form-control" id="field_touser" name="touser" ng-model="vm.messageTp.touserId" ng-options="userInfo.id as userInfo.id for userInfo in vm.userinfos"            >
                <option value=""></option>
            </select>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="vm.clear()">
            <span class="glyphicon glyphicon-ban-circle"></span>&nbsp;<span data-translate="entity.action.cancel">Cancel</span>
        </button>
        <button type="submit" ng-disabled="editForm.$invalid || vm.isSaving" class="btn btn-primary">
            <span class="glyphicon glyphicon-save"></span>&nbsp;<span data-translate="entity.action.save">Save</span>
        </button>
    </div>
</form>
